/*
 * XML Type:  AreaType
 * Namespace: http://www.data-archive.ac.uk/dext/schema/draft
 * Java type: uk.da.dext.AreaType
 *
 * Automatically generated - do not modify.
 */
package uk.da.dext.impl;
/**
 * An XML AreaType(@http://www.data-archive.ac.uk/dext/schema/draft).
 *
 * This is a complex type.
 */
public class AreaTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements uk.da.dext.AreaType
{
    private static final long serialVersionUID = 1L;
    
    public AreaTypeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName ID$0 = 
        new javax.xml.namespace.QName("", "id");
    private static final javax.xml.namespace.QName SHAPE$2 = 
        new javax.xml.namespace.QName("", "shape");
    private static final javax.xml.namespace.QName COORDS$4 = 
        new javax.xml.namespace.QName("", "coords");
    
    
    /**
     * Gets the "id" attribute
     */
    public java.lang.String getId()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ID$0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "id" attribute
     */
    public org.apache.xmlbeans.XmlID xgetId()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlID target = null;
            target = (org.apache.xmlbeans.XmlID)get_store().find_attribute_user(ID$0);
            return target;
        }
    }
    
    /**
     * Sets the "id" attribute
     */
    public void setId(java.lang.String id)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ID$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ID$0);
            }
            target.setStringValue(id);
        }
    }
    
    /**
     * Sets (as xml) the "id" attribute
     */
    public void xsetId(org.apache.xmlbeans.XmlID id)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlID target = null;
            target = (org.apache.xmlbeans.XmlID)get_store().find_attribute_user(ID$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlID)get_store().add_attribute_user(ID$0);
            }
            target.set(id);
        }
    }
    
    /**
     * Gets the "shape" attribute
     */
    public uk.da.dext.AreaType.Shape.Enum getShape()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(SHAPE$2);
            if (target == null)
            {
                return null;
            }
            return (uk.da.dext.AreaType.Shape.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "shape" attribute
     */
    public uk.da.dext.AreaType.Shape xgetShape()
    {
        synchronized (monitor())
        {
            check_orphaned();
            uk.da.dext.AreaType.Shape target = null;
            target = (uk.da.dext.AreaType.Shape)get_store().find_attribute_user(SHAPE$2);
            return target;
        }
    }
    
    /**
     * True if has "shape" attribute
     */
    public boolean isSetShape()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(SHAPE$2) != null;
        }
    }
    
    /**
     * Sets the "shape" attribute
     */
    public void setShape(uk.da.dext.AreaType.Shape.Enum shape)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(SHAPE$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(SHAPE$2);
            }
            target.setEnumValue(shape);
        }
    }
    
    /**
     * Sets (as xml) the "shape" attribute
     */
    public void xsetShape(uk.da.dext.AreaType.Shape shape)
    {
        synchronized (monitor())
        {
            check_orphaned();
            uk.da.dext.AreaType.Shape target = null;
            target = (uk.da.dext.AreaType.Shape)get_store().find_attribute_user(SHAPE$2);
            if (target == null)
            {
                target = (uk.da.dext.AreaType.Shape)get_store().add_attribute_user(SHAPE$2);
            }
            target.set(shape);
        }
    }
    
    /**
     * Unsets the "shape" attribute
     */
    public void unsetShape()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(SHAPE$2);
        }
    }
    
    /**
     * Gets the "coords" attribute
     */
    public java.lang.String getCoords()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COORDS$4);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "coords" attribute
     */
    public org.apache.xmlbeans.XmlString xgetCoords()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(COORDS$4);
            return target;
        }
    }
    
    /**
     * Sets the "coords" attribute
     */
    public void setCoords(java.lang.String coords)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COORDS$4);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(COORDS$4);
            }
            target.setStringValue(coords);
        }
    }
    
    /**
     * Sets (as xml) the "coords" attribute
     */
    public void xsetCoords(org.apache.xmlbeans.XmlString coords)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(COORDS$4);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(COORDS$4);
            }
            target.set(coords);
        }
    }
    /**
     * An XML shape(@).
     *
     * This is an atomic type that is a restriction of uk.da.dext.AreaType$Shape.
     */
    public static class ShapeImpl extends org.apache.xmlbeans.impl.values.JavaStringEnumerationHolderEx implements uk.da.dext.AreaType.Shape
    {
        private static final long serialVersionUID = 1L;
        
        public ShapeImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType, false);
        }
        
        protected ShapeImpl(org.apache.xmlbeans.SchemaType sType, boolean b)
        {
            super(sType, b);
        }
    }
}
